import request from "@/utils/request";

// 获取用能单元树结构
export function getEnergyUnitTree() {
    return request({
        url: "/intra/analysis/energyunit/tree",
        method: "get",
    });
}

// 获取设备列表
export function getDeviceList(params) {
    return request({
        url: "/intra/analysis/device/list",
        method: "get",
        params: params,
    });
}

// 获取负荷分析数据
export function getLoadAnalysisData(params) {
    return request({
        url: "/intra/analysis/load/data",
        method: "get",
        params: params,
    });
}

// 获取负荷统计数据
export function getLoadStatistics(params) {
    return request({
        url: "/intra/analysis/load/statistics",
        method: "get",
        params: params,
    });
}

// 导出负荷分析数据
export function exportLoadAnalysisData(params) {
    return request({
        url: "/intra/analysis/load/export",
        method: "post",
        data: params,
        responseType: "blob",
    });
}